<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/displaytag-11.tld" prefix="display"%>
<%@ taglib uri="/WEB-INF/displaytag-11.tld" prefix="display"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>RegistrarGrupoFamiliar</title>
<link href="../../css/jdeveloper.css" rel="stylesheet" media="screen" />
<link href="<%=request.getContextPath() + "/css/bloques.css"%>"
	rel="stylesheet" type="text/css">

<script type="text/javascript">
      
      function Retornar()
      {
        document.frmRegistrarGrupo.action = '<%=request.getContextPath()%>'
				+ '/beneficiarios/VerGrupoFamiliar.do';
		document.frmRegistrarGrupo.submit();
	}
</script>

</head>
<body>
	<script src="<%=request.getContextPath()%>/js/displaytag.js"
		type="text/javascript"></script>
	<form name="frmRegistrarGrupo" method="get"
		action="<%=request.getContextPath() + "/beneficiarios/Buscar.do"%>">
		<div align="center">
			<table class="tablaGenericaWidth70">
				<tr>
					<td colspan="3" class="titulosenblanco">
						<DIV align="center">
							<STRONG>Registrar Grupo Familiar</STRONG>
						</DIV>
					</td>
				</tr>
				<tr>
					<td colspan="3">&nbsp;</td>
				</tr>
				<logic:present name="ListBeneSelected">
					<logic:iterate id="bene" length="1" name="ListBeneSelected"
						scope="request">
						<tr>
							<td width="18%" class="celdatabla"><STRONG>Beneficiario:</STRONG>
							</td>
							<td width="40%">
								<div class="form">
									<bean:write name="bene" property="numeroDocumento" />
									<bean:write name="bene" property="nombre1" />
									<bean:write name="bene" property="nombre2" />
									<bean:write name="bene" property="primerApellido" />
									<bean:write name="bene" property="segundoApellido" />
								</div>
							</td>
							<td width="20%">&nbsp;</td>
						</tr>
					</logic:iterate>
				</logic:present>
				<tr>
					<td colspan="3">&nbsp;</td>
				</tr>
			</table>
		</div>

		<logic:present name="msgerror">
			<DIV align="left" class="celdatabla">
				<strong><%=session.getAttribute("msgerror")%></strong>
			</DIV>
			<%
				session.removeAttribute("msgerror");
			%>
		</logic:present>
		<logic:present name="msgasignar">
			<DIV align="left" class="celdatabla">
				<strong><%=session.getAttribute("msgasignar")%></strong>
			</DIV>
			<%
				session.removeAttribute("msgasignar");
			%>
		</logic:present>

		<logic:notPresent name="msgerror">
			<logic:present name="ListBeneInsert">
				<div align="center">
					<table class="tablaGenericaWidth60">
						<tr>
							<td class="titulosenblanco" align="center">Los siguientes
								Beneficiarios fueron asignados al Grupo Familiar</td>
						</tr>
						<tr>
							<td></td>
						</tr>
						<tr>
							<td><display:table name="ListBeneInsert" pagesize="20"
									id="BeneInsert" class="bordesTable" cellpadding="3"
									cellspacing="1" style="width:100%">
									<display:column headerClass="headerTable" title="Documento"
										class="Numero" sortable="true">
										<div align="center">
											<bean:write name="BeneInsert" property="numeroDocumento" />
										</div>
									</display:column>
									<display:column headerClass="headerTable"
										title="Nombres y Apellidos" class="Numero" sortable="false">
										<bean:write name="BeneInsert" property="nombre1" />
										<bean:write name="BeneInsert" property="nombre2" />
										<bean:write name="BeneInsert" property="primerApellido" />
										<bean:write name="BeneInsert" property="segundoApellido" />
									</display:column>
								</display:table></td>
						</tr>
					</table>
				</div>
			</logic:present>
		</logic:notPresent>
		<p>&nbsp;</p>
		<logic:present name="ListBeneNoInsert">
			<div align="center">
				<table class="tablaGenericaWidth60">
					<tr>
						<td class="titulosenblanco" align="center">Los siguientes
							Beneficiarios no fueron asignados al Grupo Familiar</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>
							<P></P> <display:table name="ListBeneNoInsert" pagesize="20"
								id="BeneNoInsert" class="bordesTable" cellpadding="3"
								cellspacing="1" style="width:100%">
								<display:column headerClass="headerTable" title="Documento"
									class="Numero" sortable="true">
									<div align="center">
										<bean:write name="BeneNoInsert" property="numeroDocumento" />
									</div>
								</display:column>
								<display:column headerClass="headerTable"
									title="Nombres y Apellidos" class="Numero" sortable="false">
									<bean:write name="BeneNoInsert" property="nombre1" />
									<bean:write name="BeneNoInsert" property="nombre2" />
									<bean:write name="BeneNoInsert" property="primerApellido" />
									<bean:write name="BeneNoInsert" property="segundoApellido" />
								</display:column>
							</display:table>
						</td>
					</tr>
				</table>
			</div>

		</logic:present>

		<div align="center">
			<table class="tablaGenericaWidth60">
				<tr>
					<td>
						<%
							String strReturn = (String) request.getAttribute("Return");
							if (strReturn == null) {
						%>
						<DIV align="center">
							<input type="SUBMIT" value="Siguiente" />
						</DIV> <%
 	} else {
 %> <logic:present name="ListBeneSelected">
							<logic:iterate id="bene" length="1" name="ListBeneSelected"
								scope="request">
								<DIV align="center">
									<input type="HIDDEN" name="code"
										value="<bean:write name="bene" property="code"/>" /> <input
										type="button" value="Siguiente" onclick="Retornar()" />
								</DIV>
							</logic:iterate>
						</logic:present> <logic:notPresent name="ListBeneSelected">
							<div align="center">
								<table
									style="width: 50%; border: 0; padding: 2px; border-spacing: 3px;">
									<tr>
										<td align="right"><input type="SUBMIT" value="Siguiente" />
										</td>
									</tr>
								</table>
							</div>
						</logic:notPresent> <%
 	}
 %>
					</td>
				</tr>
			</table>
		</div>
	</form>
</body>
</html>
